﻿@using System.Data;
@using ZoomLa.BLL.Helper
@using ZoomLa.Common
@model ZoomLa.SQLDAL.SQL.PageSetting
@functions{
    public string ShowCardNum(DataRow dr,int scount)
    {
        string card = DataConverter.CStr(dr["CardNum"]);
        if (string.IsNullOrEmpty(card) || card.Length < scount) { return card; }
        string result = "";
        for (int i = 0; i < card.Length-scount; i++)
        {
            result += "*";
        }
        return result + card.Substring(card.Length-scount,scount);
    }
}
@{
    Model.cols = 8;
}
<div class="container" id="EGV">
    <table class="table table-bordered table-striped">
        <tr><td></td><td>ID</td><td>开户人</td><td>银行名称</td><td>银行账号</td><td>添加时间</td><td>备注</td><td>操作</td></tr>
        @foreach (DataRow dr in Model.dt.Rows)
        {
            <tr>
                <td><input type="checkbox" name="idchk" class="idchk" value="@dr["ID"]" /></td>
                <td>@dr["ID"]</td>
                <td>@dr["PeopleName"]</td>
                <td>@dr["BankName"]</td>
                <td>@ShowCardNum(dr,4)</td>
                <td>@DateHelper.ToDate(dr["AddTime"])</td>
                <td>@dr["Remark"]</td>
                <td>
                    <a href="UserBankAdd?id=@dr["ID"]" class="option_style"><i class="fa fa-pencil"></i>修改</a>
                    <a href="javascript:;" class="option_style" onclick='mvcpage.del({ url: "UserBank_Del",ids: "@dr["ID"]",confirm: "确认要删除吗？" });'><i class="fa fa-trash-o"></i>删除</a>
                </td>
            </tr>
        }
        @Html.Partial("_page", Model)
    </table>
</div>